/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.controller.event;

import com.entities.EventLibrary;
import com.model.EventLibraryModel;
import java.util.List;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

/**
 *
 * @author Tuan Long
 */
@Named(value = "showEvent")
@RequestScoped
public class showEvent {

    /**
     * Creates a new instance of showEvent
     */
    EventLibraryModel model = new EventLibraryModel();
    private List<EventLibrary> events_DataTable;

    public List<EventLibrary> getEvents_DataTable() {
        return model.fillEventsDataTable();
    }

    public showEvent() {
    }

    private List<EventLibrary> totalEventType;

    public List<EventLibrary> getTotalEventType() {
        return model.fillTotalEventTypeTable();
    }

    private int day;

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    private List<EventLibrary> eventComming;

    public List<EventLibrary> getEventComming() {        
        return model.getEventComming(day);
    }

    /**
     * @showEvent.ShowMoreEventComming     
     * @return String
     */
    public String ShowMoreEventComming() {
        eventComming = model.getEventComming(day);
        return "index?faces-redirect=true";
    }

}
